<template>
	<!-- 公司公告详情页面 -->
	<view class="pages">
		<u-navbar back-icon-color="#fff" :is-back="true" :border-bottom="false" title="公告详情" title-color="#fff"
			:title-size="40">
		</u-navbar>
		<view>
			{{announcements.content}}
		</view>
		<view class="people-time">
			<view>
				<u-icon name="account" color="#8E96E9" size="40"></u-icon>
				<view>{{announcements.title}}</view>
			</view>
			<view>
				<u-icon name="clock" color="#8E96E9" size="40"></u-icon>
				<view>{{announcements.created_at}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				announcements: {}
			}
		},
		methods: {
			goBack() {
				uni.redirectTo({
					url: '/pages/index/index'
				})
			}
		},
		onLoad(e) {
			this.$http(this.$api.announcementDetail, {
				id: e.id
			}).then((res) => {
				this.announcements = res.data
			})
		}
	}
</script>

<style>
	.pages {
		padding: 10px;
		position: relative;
	}

	.pages>view:nth-child(2) {
		padding: 10px 5px;
		border-bottom: #c8c9cc 1px solid;
		text-indent: 2em;
		line-height: 45rpx;
		letter-spacing: 5rpx;
	}

	.people-time {
		margin-top: 40rpx;
		line-height: 80rpx;
	}

	.people-time>view {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		width: 50%;
		margin-left: 50%;
	}

	u-icon {
		margin-right: 10rpx;
	}
</style>
